package com.superbytecode.cloud.example.web.controller;

import com.superbytecode.cloud.example.web.dto.EmployeeVo;
import com.superbytecode.cloud.example.web.service.EmployeeService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.List;

/**
 * All rights Reserved, Designed By www.super-master.com
 *
 * @ProjectName: beacon-cloud
 * @Package: com.superbytecode.cloud.example.web.controller
 * @ClassName: EmployeeController
 * @Description: []
 * <p> </p>
 * @Author: [Lance Ting]
 * @Date: 2024/10/22 15:48
 * @Version: V1.0
 * @Copyright: 2024 www.super-master.com Inc. All rights reserved.
 * TODO: 注意,本文件Lance Ting所作,如果转载或使用请标明具体出处!
 **/
@Slf4j
@Api
@Validated
@RestController
@RequestMapping("/test")
public class EmployeeController {
    @Resource
    private EmployeeService employeeService;

    @PostMapping("/employee")
    public EmployeeVo query(@Valid @RequestBody EmployeeVo vo) {
        return employeeService.queryEmployee(vo);
    }
}